package com.ruoyi.web.controller.plan;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.plan.domain.StudyContent;
import com.ruoyi.plan.service.IWorkSpaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

/**
 * @author MLYNDHG
 * @version 1.0
 * @description TODO
 * @date 2023/12/7 17:12
 */
@RestController
@RequestMapping("/plan/workSpace")
public class WorkSpaceController  extends BaseController {
    @Autowired
    private IWorkSpaceService workSpaceService;

    /**
     * 查询学习计划 列表
     */
    @PreAuthorize("@ss.hasPermi('plan:workSpace:list')")
    @PostMapping("/todyTodoList")
    public TableDataInfo todyTodoList()
    {
        List<StudyContent> list = workSpaceService.selectWorkSpaceTodyTodoList();
        return getDataTable(list);
    }

    /**
     * 查询学习计划 列表
     */
    @PreAuthorize("@ss.hasPermi('plan:workSpace:list')")
    @PostMapping("/todyReviewList")
    public TableDataInfo todyReviewList()
    {
        List<HashMap>  list = workSpaceService.selectWorkSpaceTodyReviewList();
        return getDataTable(list);
    }
}
